﻿
#pragma once

#include <cstdint>
#include "hzpch.h"
#include "Hazel.h" // 包含 Ref<T> = std::shared_ptr<T>

namespace Hazel
{

    // 顶点缓冲区
    class VertexBuffer
    {
    public:
        virtual ~VertexBuffer() = default;

        virtual void Bind() const = 0;
        virtual void Unbind() const = 0;

        virtual void SetData(const void *data, uint32_t size) = 0;

        virtual const void *GetContents() const = 0;
        virtual uint32_t GetSize() const = 0;

        static Ref<VertexBuffer> Create(uint32_t size);
        static Ref<VertexBuffer> Create(const void *data, uint32_t size);
    };

    // 索引缓冲区
    class IndexBuffer
    {
    public:
        virtual ~IndexBuffer() = default;

        virtual void Bind() const = 0;
        virtual void Unbind() const = 0;

        virtual uint32_t GetCount() const = 0;

        static Ref<IndexBuffer> Create(const uint32_t *indices, uint32_t count);
    };

}